Adding the Report Viewer to a Visual Basic project

If you create a new report using the Create Report Expert in the Crystal Report Designer Component, the Report Viewer control can be automatically added to a Form in your Visual Basic project. However, there may be times when you need to add the control by hand. In addition, the Report Viewer control can be implemented in other environments, many of which may not support ActiveX designers, meaning the Create Report Expert is unavailable.

Use the following steps to add the Crystal Report Viewer ActiveX control to a Form in your Visual Basic application. This tutorial assumes the Form already exists in your project and is named Form1.

  1. First, you must verify that a reference to the Report Viewer control exists in your project. From the Project menu, select the Components command. The Components dialog box appears.
  2. On the Controls Tab of the Components dialog box, scroll through the list of ActiveX controls until you find Crystal Report Report Viewer.

    Note:    If you do not see the Crystal Report Report Viewer control in the list, use the Browse button to locate the CRVIEWER.DLL component in the C:\Program Files\Seagate Software\Viewers\ActiveXViewer directory.

  3. If the check box next to the Report Viewer control is not toggled on, toggle it on now.
  4. Click OK, and the CRViewer control will appear in the Visual Basic toolbox.
  5. Click the CRViewer control on the toolbox, then draw the Report Viewer control on your form by dragging a rectangle across the form with the mouse pointer. An instance of the control will be added to your Form.
  6. Adjust the size and position of the Report Viewer on your form, and use the Properties window to adjust the overall appearance of the control.


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com